﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucNewsList.ascx.cs"
    Inherits="TTMarketing.UserControl.Tintuc.ucNewsList" %>
<asp:ObjectDataSource ID="odsNewList" runat="server" SelectMethod="getByTypeAndStatus"
    TypeName="TTBusiness.ClassDB.clsBSCateNews">
    <SelectParameters>
        <asp:Parameter DefaultValue="6" Name="typeid" Type="Int32" />
        <asp:Parameter DefaultValue="true" Name="status" Type="Boolean" />
    </SelectParameters>
</asp:ObjectDataSource>
<div class="componentheading">
    TIN TỨC
</div>
<telerik:RadListView ID="rlwNewsList" runat="server" DataSourceID="odsNewList" PageSize="3"
    Width="95%">
    <ItemTemplate>
        <table align="center" border="0" cellpadding="0" cellspacing="0" style="border-bottom: #1f9b23 2px solid;"
            width="95%">
            <tr>
                <td height="41" align="left">
                    <span class="title2"><a href='tin-tuc.aspx?catid=<%# Eval("id") %>'>
                        <asp:Label ID="TenTheLoaiLabel" runat="server" Text='<%# Eval("Name") %>' Font-Size="Large"
                            ForeColor="#009933" /></a> </span>
                    <asp:HiddenField ID="hfCateID" runat="server" Value='<%# Eval("ID") %>' />
                </td>
            </tr>
        </table>
        <asp:ObjectDataSource ID="odsListNewsByCate" runat="server" SelectMethod="getByCate"
            TypeName="TTBusiness.ClassDB.clsBSNews">
            <SelectParameters>
                <asp:Parameter DefaultValue="true" Name="status" Type="Boolean" />
                <asp:ControlParameter ControlID="hfCateID" Name="cateId" PropertyName="Value" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <telerik:RadListView ID="rlwListProductByCate" runat="server" DataSourceID="odsListNewsByCate"
            AllowPaging="True" PageSize="3">
            <ItemTemplate>
                <div class="contentpagetitle">
                    <table width="100%" cellpadding="0" cellspacing="0">
                        <tbody>
                            <tr>
                                <td valign="top" width="100%" class="article_column">
                                    <table class="contentpaneopen">
                                        <tbody>
                                            <tr>
                                                <td class="contentheading" width="100%">
                                                    <a href='tin-tuc.aspx?id=<%# Eval("ID") %>' title='<%# Eval("Title") %>'>
                                                        <%# Eval("Title")%></a>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                    <table class="contentpaneopen">
                                        <tbody>
                                            <tr>
                                                <td valign="top" colspan="2">
                                                    <p>
                                                        <strong>
                                                            <img src='<%# "Image/Upload/" + Eval("Image") %>' alt='<%# Eval("Title") %>' style="margin-top: 3px;
                                                                margin-right: 5px; float: left;" width="149" height="112">
                                                        </strong>
                                                    </p>
                                                    <p>
                                                        <strong><span style="color: #0000ff;">
                                                            <%# Eval("Summary")%></span></strong>
                                                    </p>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                        </tbody>
                    </table>
                </div>
                <span class="article_separator"></span>
            </ItemTemplate>
        </telerik:RadListView>
        <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="rlwListProductByCate"
            PageSize="3" Skin="Default" Width="100%" BorderStyle="None" BackColor="Transparent">
            <Fields>
                <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                <telerik:RadDataPagerButtonField FieldType="Numeric" />
                <telerik:RadDataPagerButtonField FieldType="NextLast" />
                <telerik:RadDataPagerPageSizeField />
            </Fields>
        </telerik:RadDataPager>
        <span class="article_separator"></span>
        <br />
    </ItemTemplate>
</telerik:RadListView>
